package com.suyafei.service;

import com.suyafei.model.CouponRecordMessage;
import com.suyafei.request.LockCouponRecordRequest;
import com.suyafei.util.JsonData;
import com.suyafei.vo.CouponRecordVO;

import java.util.Map;

/**
 * @program: suyafei-1024-shop
 * @description
 * @author: luffy
 * @create: 2021-03-07 20:12
 */
public interface CouponRecordService {

    /**
     * 分页查询领劵记录
     * @param page
     * @param size
     * @return
     */
    Map<String, Object> page(int page, int size);

    /**
     * 查询领劵记录详情
     * @param recordId
     * @return
     */
    CouponRecordVO findById(long recordId);

    /**
     * 锁定优惠券
     * @param lockCouponRecordRequest
     * @return
     */
    JsonData lockCouponRecords(LockCouponRecordRequest lockCouponRecordRequest);

    /**
     * 释放锁记录
     * @param couponRecordMessage
     * @return
     */
    boolean releaseCouponRecord(CouponRecordMessage couponRecordMessage);
}
